import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home'
import Comment from '@/views/Comment'


Vue.use(VueRouter)
const routes = [
    {
        path: "/",
        redirect: "/home"
    },
    {
        path: "/home",
        component: Home,
        meta: {
            title: "首页"
        }
    },
    {
        path: "/comment",
        component: Comment,
        meta: {
            title: "评论"
        }
    }
]

const router = new VueRouter({
    scrollBehavior: () => { return { x: 0, y: 0 } },
    routes
})

export default router